package cn.iocoder.yudao.module.book.dal.mysql.methods;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.book.controller.app.protocolAndmethod.vo.AppMethodsRespVO;
import cn.iocoder.yudao.module.book.dal.dataobject.methods.MethodsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.book.controller.admin.methods.vo.*;

/**
 * 启蒙方法 Mapper
 *
 * @author xi
 */
@Mapper
public interface MethodsMapper extends BaseMapperX<MethodsDO> {

    default PageResult<MethodsDO> selectPage(MethodsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MethodsDO>()
                .eqIfPresent(MethodsDO::getMethodId, reqVO.getMethodId())
                .eqIfPresent(MethodsDO::getContent, reqVO.getContent())
                .betweenIfPresent(MethodsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MethodsDO::getMethodId));
    }

    AppMethodsRespVO selectAll();

}